<?php
/**
 * Created by PhpStorm.
 * User: jocky
 * Date: 30/09/2017
 * Time: 01:59
 */
namespace frontend\controllers;
use yii\web\NotFoundHttpException;
use yii\web\Controller;

class ErrorController extends Controller
{
	public $layout="error";
	public function actions()
    {
        return [
            'index' => [
                'class' => 'yii\web\ErrorAction',
            ],
        ];
    }

    public function actionIndex()
    {
        // exit("Request Error");
            $exception = Yii::$app->errorHandler->exception;
    if ($exception !== null) {
        return $this->render('index', ['exception' => $exception]);
    }
    }
}